package com.googlecode.garbagecan.springsecuritystudy.util;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class DBInitServlet extends HttpServlet {

	public void init() throws ServletException {
		DBUtil dbUtil = new DBUtil();
		try {
			dbUtil.initDB();
		} catch (Exception ex) {
			ex.printStackTrace();
		}

		try {
			dbUtil.testDB();
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
	}
}
